﻿using System;
using System.Diagnostics;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace TeamDeploy.Tasks.Tests
{
    [TestClass]
    public class RemoteExecuteTests
    {
        [TestMethod]
        public void ExecuteCalc()
        {

            RemoteExecute task = new RemoteExecute();

            task.BuildEngine = new MockBuild();
            task.RemoteCommand = "calc.exe";
            task.RemoteExecutePathFilename = "c:\\pstools\\psexec2.exe";
            task.TargetMachine = Environment.MachineName;
            task.WaitForExit = "false";

            Assert.IsTrue(task.Execute(), "Execute Failed");

        }
    }
}
